﻿app.factory('roleFactory', function ($http) {
    var factory = {};
    
    factory.getRoles= function () {
        return $http.get(getRolesApiAddress);
    };
    //factory.getUser = function (id) {
    //    return $http.get(getUserApiAddress + id);
    //};
    factory.postRole = function (dataPost) {
        return $http.post(postRoleApiAddress, dataPost);
    };
    factory.putRole = function (dataPost) {
        return $http.post(putRoleApiAddress, dataPost);
    };
    factory.deleteRole = function (id) {
        return $http.post(deleteRoleApiAddress+ id);
    };
    return factory;
});